package com.car.controller;

import com.car.entity.StorePpastData;
import com.car.service.impl.StorePpastDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class StorePpastDataController {//门店往期数据
    @Autowired
    @Qualifier("storePpastDataService")
    private StorePpastDataService storePpastDataService;

    @RequestMapping(value = "mdwqsj")
    public String mdcx(Model model){//门店查询
        List<StorePpastData> spd = storePpastDataService.spd();
        model.addAttribute("la",spd);
        return "/bosssystem/before_storedata.jsp";
    }

    @RequestMapping(value = "sjcx")
    public String mdsjcx(String regtime,Model model){//门店时间查询
        System.out.println(regtime);
        List<StorePpastData> sj = storePpastDataService.sjcx(regtime);
        System.out.println(sj);
        model.addAttribute("la",sj);
        return "/bosssystem/before_storedata.jsp";
    }
}
